<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<center>
      <table class="table-hover table-bordered table-striped">
          <tr>
              <td>姓名</td>
              <td><input type="text" name="name" id="name"></td>
          </tr>
          <tr>
              <td>手机</td>
              <td><input type="text" name="number" id="number"></td>
          </tr>
          <tr>
              <td>地址</td>
              <td><input type="text" name="article" id="article"></td>
          </tr>
          <tr>
              <td></td>
              <td><input type="button" value="添加" id="submit"></td>
          </tr>
      </table>

</center>
</body>
</html>
<script type="text/javascript" src="__STATIC__/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript">
    //添加
    $(document).on('click','#submit',function () {
        var name    = $("#name").val();
        var number  = $("#number").val();
        var article = $("#article").val();

        $.ajax({
            type:"post",
            url:"add1",
            data:{name:name,number:number,article:article},
            success:function (data){
                if(data==1){
                   alert("添加成功");
                   window.location.href="{:url('index/fux1/show')}";
                }else{
                    alert("添加失败");
                }
            }
        })
    })
    //删除

</script>